//常量路由
export const constanceRoute = [
  {
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    name: 'login',
    meta: {
      title: '登录',
      hidden: true,
    },
  },
  {
    path: '/',
    component: () => import('@/layout/index.vue'),
    name: 'layout',
    meta: {
      title: 'layout',
    },
    redirect: "/home",
    children: [
      {
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        name: 'Home',
        meta: {
          title: '首页',
          icon: 'HomeFilled',
          hidden: false,
        },
      },
      {
        path: '/goods',
        meta: {
          title: '商品管理',
          icon: 'GoodsFilled',
          hidden: false,
        },
        redirect: "/goods/goodslist",
        children:[
          {
            path: '/goods/goodslist',
            component: () => import('@/views/goods/goodslist/index.vue'),
            name:"Goodslist",
            meta: {
              title: '商品管理',
              icon: 'Goods',
              hidden: false,
            },
          },
        ]
      },
      {
        path: '/acl',
        meta: {
          title: '权限管理',
          icon: 'Lock',
          hidden: false,
        },
        redirect: "/acl/user",
        children: [
          {
            path: '/acl/user',
            component: () => import('@/views/acl/user/index.vue'),
            name:"User",
            meta: {
              title: '用户管理',
              icon: 'user',
              hidden: false,
            },
          },
          {
            path: '/acl/role',
            component: () => import('@/views/acl/role/index.vue'),
            name:"Role",
            meta: {
              title: '角色管理',
              icon: 'UserFilled',
              hidden: false,
            },
          },
          {
            path: '/acl/permission',
            component: () => import('@/views/acl/permission/index.vue'),
            name:"Permission",
            meta: {
              title: '菜单管理',
              icon: 'Grid',
              hidden: false,
            },
          },
        ],
      },
      {
        path: '/map',
        component: () => import('@/views/map/index.vue'),
        name: 'Map',
        meta: {
          title: '地图',
          icon: 'MapLocation',
          hidden: false,
        },
      },
    ],
  },
  {
    path: '/screen',
    component: () => import('@/views/screen/index.vue'),
    name: 'Screen',
    meta: {
      title: '大屏',
      hidden: false,
      icon: "DataBoard"
    },
  },
  {
    path: '/404',
    component: () => import('@/views/404/index.vue'),
    name: '404',
    meta: {
      title: '404',
      hidden: true,
    },
  },
  {
    // 匹配任意路由
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'any',
    meta: {
      title: '任意',
      hidden: true,
    },
  },
]
